package rubix.events
{
	import flash.events.Event;
	import flash.geom.Vector3D;
	
	public class CubeEvent extends Event
	{
		public static const CUBE_ROTATED:String = "cubeRotated";
		public static const CUBE_HIGHLIGHTED:String = "cubeHighlighted";
		public static const CUBE_UNHIGHLIGHTED:String = "cubeUnHighlighted";
		private var _degrees:Number;
		private var _cubeID:int;
		private var _axis:Vector3D;
		
		public function CubeEvent(type:String,cubeID:int,degrees:Number=Number.NaN,axis:Vector3D=null){
			super(type);
			this._degrees=degrees;
			this._cubeID=cubeID;
			this._axis=axis;
		}

		public function get axis():Vector3D
		{
			return _axis;
		}

		public function get cubeID():int
		{
			return _cubeID;
		}

		public function get degrees():Number
		{
			return _degrees;
		}

		override public function clone():Event
		{
			return new CubeEvent(type,cubeID,degrees,axis);
		}
		override public function toString():String
		{
			return formatToString("CubeEvent", "type", "bubbles", "cancelable", "degrees", "cubeID",
				"eventPhase");
		}
	}
}